<?php
class Zones {
	var $id = null;
	var $title = null;
	
	function viewAll() {
		$query = "select * from dt_zone";
		$data = mysql_query($query);
		return $data;
	}
	
	function selectSingle($id) {
		$query = "select * from dt_zone where z_id = '$id'";
		$data = mysql_query($query);
		return $data;
	}
	
	function update($id, $title) {
		$query = "update dt_zone set z_title = '$title' where z_id = '$id'";
		mysql_query($query);
	}
	
	function delete($id) {
		$query = "delete from dt_zone where z_id = '$id'";
		mysql_query($query);
	}
	
	function insert($title) {
		$query = "insert into dt_zone (z_title) values ('$title')";
		mysql_query($query);
	}
}
?>